.TH std::ranges::subrange::prev 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::ranges::subrange::prev \- std::ranges::subrange::prev

.SH Synopsis
   [[nodiscard]] constexpr subrange prev( std::iter_difference_t<I> n =
   1 ) const                                                              \fI(since C++20)\fP
       requires std::bidirectional_iterator<I>;

   Obtains a subrange whose iterator is decremented by n times or incremented by
   min(-n, size()) times respect to that of *this, when n >= 0 or n < 0 respectively.

   Equivalent to auto tmp = *this; tmp.advance(-n); return tmp;. The behavior is
   undefined if the iterator is decremented after being a non-decrementable value.

.SH Parameters

   n - number of minimal decrements of the iterator

.SH Return value

   A subrange whose iterator is decremented by n times or incremented by min(-n,
   size()) times respect to that of *this, when n >= 0 or n < 0 respectively.

.SH Complexity

   Generally n decrements or min(-n, size()) increments on the iterator, when n >= 0 or
   n < 0 respectively.

   Constant if I models random_access_iterator, and either n >= 0 or
   std::sized_sentinel_for<S, I> is modeled.

.SH Example

    This section is incomplete
    Reason: no example

.SH See also

   next         obtains a copy of the subrange with its iterator advanced by a given
   (C++20)      distance
                \fI(public member function)\fP
   advance      advances the iterator by given distance
   (C++20)      \fI(public member function)\fP
   prev         decrement an iterator
   \fI(C++11)\fP      \fI(function template)\fP
   ranges::prev decrement an iterator by a given distance or to a bound
   (C++20)      (niebloid)

.SH Category:
     * Todo no example
